package org.example;

import org.example.service.MonkeyService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DIAutowire {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        MonkeyService monkeyService = (MonkeyService) applicationContext.getBean("monkeyService");
        monkeyService.save();
    }
}
